package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterUserDressupDao;
import com.vf.admin.miaodong.entity.AppUserDressup;
import com.vf.admin.miaodong.service.AfterUserDressupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 购买坐骑记录
 */
@Service
public class AfterUserDressupServiceImpl implements AfterUserDressupService {

    @Autowired
    AfterUserDressupDao afterUserDressupDao;

    /**
     * 综合查询列表
     */
    @Override
    public List<AppUserDressup> list(Map<String, Object> paraMap, SplitPageBean splitPage) {
        return afterUserDressupDao.list(paraMap, splitPage);
    }

    /**
     * 添加/修改
     */
    @Override
    public void save(AppUserDressup haoYou) {
        afterUserDressupDao.save(haoYou);
    }

    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
        afterUserDressupDao.del(id);
    }

    /**
     * 详情
     */
    @Override
    public AppUserDressup get(Integer id) {
        return afterUserDressupDao.get(id);
    }

    /**
     * 后台管理获取自己未过期的坐骑
     * @param map
     * @param bean
     * @return
     */
    @Override
    public List<AppUserDressup> findWeiGuoQiList(Map<String, Object> map, SplitPageBean bean) {
        return afterUserDressupDao.findWeiGuoQiList(map,bean);
    }

    /**
     * 删除所有已过期的坐骑、头饰记录
     * @return
     */
    public void delAllGuoQi(){
        afterUserDressupDao.delAllGuoQi();
    }
}
